/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * BrewersOpReportFrame.java
 *
 * Created on Jul 22, 2011, 3:04:16 PM
 */

package gbbmgmt;
import org.jdesktop.application.Action;
import java.util.*;
//import javax.swing.JOptionPane;
import javax.swing.table.*;
import java.text.*;
import java.text.DateFormat;
import java.util.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;


/**
 *
 * @author dchapman
 */
public class BrewersOpReportFrame extends javax.swing.JFrame {

    //Float arrays for results.
    public float[] b = new float[36];
    public float[] c = new float[36];
    public float[] d = new float[36];
    public float[] e = new float[36];
    public float[] f = new float[36];
    public float[] g = new float[36];

    public NumberFormat f2 = new DecimalFormat("#0.00");

    //Arrays for Database querries to save old entires...
    public ArrayList<String[]> OLagerArray;
    public ArrayList<String[]> OPkgArray;
    public ArrayList<String[]> OCondArray;
    public ArrayList<String[]> ODestroyed;
    public ArrayList<String[]> OTRMovement;
    public ArrayList<String[]> OCustMovement;
    public ArrayList<String[]> OBarrelVol;
    public ArrayList<String[]> OBarrelPrimeMove;
    public ArrayList<String[]> OBarrelSecondMove;
    public ArrayList<String[]> OBarrelCondMove;
    public ArrayList<String[]> OCondBarrelMove;

    //Arrays for Database querries to save new entries....
    public ArrayList<String[]> LagerArray;
    public ArrayList<String[]> CondArray;
    public ArrayList<String[]> PkgArray;
    public ArrayList<String[]> NPkgArray;
    public ArrayList<String[]> Destroyed;
    public ArrayList<String[]> TRMovement;
    public ArrayList<String[]> CustMovement;
    public ArrayList<String[]> BarrelVol;
    public ArrayList<String[]> BarrelPrimeMove;
    public ArrayList<String[]> BarrelSecondMove;
    public ArrayList<String[]> BarrelCondMove;
    public ArrayList<String[]> CondBarrelMove;

    //Misc arrays needed.
    public ArrayList<String[]> FermAmt;
    public ArrayList<String[]> KegMove;
    public ArrayList<String[]> BtlMove;
    public ArrayList<String[]> BrewIDs;

    //Variables for the total ingredients.
    public float WheatTot;
    public float OatTot;
    public float HoneyTot;
    public float MolassesTot;
    public float BarleyTot;
    public float HopTot;

    /** Creates new form BrewersOpReportFrame */
    public BrewersOpReportFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jDateChooserStart = new com.toedter.calendar.JDateChooser();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jDateChooserStop = new com.toedter.calendar.JDateChooser();
        jYearChooser1 = new com.toedter.calendar.JYearChooser();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jRadioButtonQ1 = new javax.swing.JRadioButton();
        jRadioButtonQ2 = new javax.swing.JRadioButton();
        jRadioButtonQ3 = new javax.swing.JRadioButton();
        jRadioButtonQ4 = new javax.swing.JRadioButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabelTaxLiability = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jButtonRunReport = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N

        jDateChooserStart.setName("jDateChooserStart"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getResourceMap(BrewersOpReportFrame.class);
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jDateChooserStop.setName("jDateChooserStop"); // NOI18N

        jYearChooser1.setName("jYearChooser1"); // NOI18N
        jYearChooser1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jYearChooser1MouseClicked(evt);
            }
        });
        jYearChooser1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jYearChooser1PropertyChange(evt);
            }
        });

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jSeparator1.setName("jSeparator1"); // NOI18N

        buttonGroup1.add(jRadioButtonQ1);
        jRadioButtonQ1.setText(resourceMap.getString("jRadioButtonQ1.text")); // NOI18N
        jRadioButtonQ1.setName("jRadioButtonQ1"); // NOI18N
        jRadioButtonQ1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jRadioButtonQ1MouseClicked(evt);
            }
        });

        buttonGroup1.add(jRadioButtonQ2);
        jRadioButtonQ2.setText(resourceMap.getString("jRadioButtonQ2.text")); // NOI18N
        jRadioButtonQ2.setName("jRadioButtonQ2"); // NOI18N
        jRadioButtonQ2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jRadioButtonQ2MouseClicked(evt);
            }
        });

        buttonGroup1.add(jRadioButtonQ3);
        jRadioButtonQ3.setText(resourceMap.getString("jRadioButtonQ3.text")); // NOI18N
        jRadioButtonQ3.setName("jRadioButtonQ3"); // NOI18N
        jRadioButtonQ3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jRadioButtonQ3MouseClicked(evt);
            }
        });

        buttonGroup1.add(jRadioButtonQ4);
        jRadioButtonQ4.setText(resourceMap.getString("jRadioButtonQ4.text")); // NOI18N
        jRadioButtonQ4.setName("jRadioButtonQ4"); // NOI18N
        jRadioButtonQ4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jRadioButtonQ4MouseClicked(evt);
            }
        });

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"(a)", "(b)", "(c)", "(d)", "(e)", "(f)", "(g)"},
                {"1. On hand beginning of this report period", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"2. We produced by fermentation", "0.00", "###########", "###########", "###########", "###########", "0.00"},
                {"3. We added water and other liquids in cellar operations", "0.00", "###########", "###########", "###########", "###########", "0.00"},
                {"4. Beer received from racking and bottling", "0.00", "###########", "###########", "###########", "###########", "0.00"},
                {"5. Beer received in bond from other breweries", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"6. Beer received from cellars", "###########", "0.00", "###########", "0.00", "###########", "0.00"},
                {"7. Beer returned to brewery", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"8. Beer returned after removal from other brewery", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"9. Racked", "###########", "###########", "0.00", "###########", "###########", "0.00"},
                {"10. Bottled", "###########", "###########", "###########", "###########", "0.00", "0.00"},
                {"11. Physical inventory disclosed an overage.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"12.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"13. Total Beer", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {null, null, null, null, null, null, null},
                {"14. Removed for consumption or sale.", "###########", "###########", "0.00", "###########", "0.00", "0.00"},
                {"15. Removed tax-determined for tap room", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"16. Removed without payment of tax for export", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"17. Removed without payment of tax for supplies.", "###########", "###########", "0.00", "###########", "0.00", "0.00"},
                {"18. Removed without payment of tax for R&D", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"19. Removed wihtout payment of tax to other breweries", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"20. Beer unfit for sale removed for use in manufacturing.", "0.00", "###########", "###########", "###########", "###########", "0.00"},
                {"21. Beer consumed on premises.", "0.00", "###########", "0.00", "###########", "0.00", "0.00"},
                {"22. Beer transferred for racking.", "0.00", "###########", "###########", "###########", "###########", "0.00"},
                {"23. Beer trasferred for bottling.", "0.00", "###########", "###########", "###########", "###########", "0.00"},
                {"24. Beer returned to cellars.", "###########", "0.00", "###########", "0.00", "###########", "0.00"},
                {"25. Beer racked.", "###########", "0.00", "###########", "###########", "###########", "0.00"},
                {"26. Beer bottled.", "###########", "###########", "###########", "0.00", "###########", "0.00"},
                {"27. Laboratory samples.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"28. Beer destoryed at brewery.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"29. Beer transferred to a distilled spirits plant.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"30. Recorded losses, including theft.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"31. Physical inventory disclosed a shortage.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"32.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"33. On hand end of period.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"},
                {"34. Total beer.", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00"}
            },
            new String [] {
                "Operations", "Cellar", "Racking (Keg)", "Kegging", "Rackign (Btl)", "Bottling", "Totals"
            }
        ));
        jTable1.setName("jTable1"); // NOI18N
        jScrollPane2.setViewportView(jTable1);
        jTable1.getColumnModel().getColumn(0).setMinWidth(300);
        jTable1.getColumnModel().getColumn(0).setPreferredWidth(300);
        jTable1.getColumnModel().getColumn(0).setMaxWidth(300);
        jTable1.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jTable1.columnModel.title0")); // NOI18N
        jTable1.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("jTable1.columnModel.title1")); // NOI18N
        jTable1.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("jTable1.columnModel.title2")); // NOI18N
        jTable1.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("jTable1.columnModel.title3")); // NOI18N
        jTable1.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("jTable1.columnModel.title4")); // NOI18N
        jTable1.getColumnModel().getColumn(5).setHeaderValue(resourceMap.getString("jTable1.columnModel.title5")); // NOI18N
        jTable1.getColumnModel().getColumn(6).setHeaderValue(resourceMap.getString("jTable1.columnModel.title6")); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jLabelTaxLiability.setText(resourceMap.getString("jLabelTaxLiability.text")); // NOI18N
        jLabelTaxLiability.setName("jLabelTaxLiability"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Material for beer.", null, null, null, null, null, null, null, null},
                {"Wort rcvd.", null, null, null, null, null, null, null, null},
                {"Wort removed.", null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null}
            },
            new String [] {
                "Item", "Hop", "Hop Extract", "HE Equiv", "Wort (BBL)", "Malted Barley", "Malted Wheat", "Oats", "Honey / Molassus"
            }
        ));
        jTable2.setName("jTable2"); // NOI18N
        jScrollPane3.setViewportView(jTable2);
        jTable2.getColumnModel().getColumn(0).setMinWidth(100);
        jTable2.getColumnModel().getColumn(0).setPreferredWidth(100);
        jTable2.getColumnModel().getColumn(0).setMaxWidth(100);
        jTable2.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jTable2.columnModel.title0")); // NOI18N
        jTable2.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("jTable2.columnModel.title1")); // NOI18N
        jTable2.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("jTable2.columnModel.title2")); // NOI18N
        jTable2.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("jTable2.columnModel.title3")); // NOI18N
        jTable2.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("jTable2.columnModel.title4")); // NOI18N
        jTable2.getColumnModel().getColumn(5).setHeaderValue(resourceMap.getString("jTable2.columnModel.title5")); // NOI18N
        jTable2.getColumnModel().getColumn(6).setHeaderValue(resourceMap.getString("jTable2.columnModel.title6")); // NOI18N
        jTable2.getColumnModel().getColumn(7).setHeaderValue(resourceMap.getString("jTable2.columnModel.title7")); // NOI18N
        jTable2.getColumnModel().getColumn(8).setHeaderValue(resourceMap.getString("jTable2.columnModel.title8")); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 828, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelTaxLiability))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 828, Short.MAX_VALUE)
                    .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 604, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(jLabelTaxLiability))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jScrollPane1.setViewportView(jPanel1);

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getActionMap(BrewersOpReportFrame.class, this);
        jButtonRunReport.setAction(actionMap.get("RunReport")); // NOI18N
        jButtonRunReport.setText(resourceMap.getString("jButtonRunReport.text")); // NOI18N
        jButtonRunReport.setName("jButtonRunReport"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonRunReport)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jDateChooserStart, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jDateChooserStop, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jLabel3)
                        .addGap(76, 76, 76)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButtonQ1)
                            .addComponent(jRadioButtonQ2))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButtonQ4)
                            .addComponent(jRadioButtonQ3))))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jYearChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(226, 226, 226))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel5))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel6)))
                        .addContainerGap())))
            .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 867, Short.MAX_VALUE)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 867, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButtonRunReport)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(jLabel6))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel3)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jDateChooserStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(9, 9, 9)
                        .addComponent(jDateChooserStop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jRadioButtonQ1)
                        .addGap(6, 6, 6)
                        .addComponent(jRadioButtonQ2))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jRadioButtonQ3)
                        .addGap(6, 6, 6)
                        .addComponent(jRadioButtonQ4))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(15, 15, 15)
                        .addComponent(jLabel2))
                    .addComponent(jYearChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButtonQ1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jRadioButtonQ1MouseClicked
        // TODO add your handling code here:
        SetDates();
    }//GEN-LAST:event_jRadioButtonQ1MouseClicked

    private void jRadioButtonQ2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jRadioButtonQ2MouseClicked
        // TODO add your handling code here:
        SetDates();
    }//GEN-LAST:event_jRadioButtonQ2MouseClicked

    private void jRadioButtonQ3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jRadioButtonQ3MouseClicked
        // TODO add your handling code here:
        SetDates();
    }//GEN-LAST:event_jRadioButtonQ3MouseClicked

    private void jRadioButtonQ4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jRadioButtonQ4MouseClicked
        // TODO add your handling code here:
        SetDates();
    }//GEN-LAST:event_jRadioButtonQ4MouseClicked

    private void jYearChooser1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jYearChooser1MouseClicked
        // TODO add your handling code here:
        SetDates();
    }//GEN-LAST:event_jYearChooser1MouseClicked

    private void jYearChooser1PropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jYearChooser1PropertyChange
        // TODO add your handling code here:
        SetDates();
    }//GEN-LAST:event_jYearChooser1PropertyChange

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new BrewersOpReportFrame().setVisible(true);
            }
        });
    }

    public void SetDates(){
        String StartDate = "";
        String StopDate = "";

        //String Year = jYearChooser1.toString();
        String Year = Integer.toString(jYearChooser1.getYear());

        //Set up date formater.
        DateFormat df = new SimpleDateFormat("MM/dd/yyyy");

        if(jRadioButtonQ1.isSelected()){
            StartDate = "01/01/" + Year;
            StopDate = "03/31/" + Year;
        } else if(jRadioButtonQ2.isSelected()){
            StartDate = "04/01/" + Year;
            StopDate = "06/30/" + Year;
        } else if(jRadioButtonQ3.isSelected()){
            StartDate = "07/01/" + Year;
            StopDate = "09/30/" + Year;
        } else if(jRadioButtonQ4.isSelected()){
            StartDate = "10/01/" + Year;
            StopDate = "12/31/" + Year;
        }

        try{
            Date stdt = df.parse(StartDate);
            jDateChooserStart.setDate(stdt);
            Date spdt = df.parse(StopDate);
            jDateChooserStop.setDate(spdt);
        } catch (ParseException e){
        }
    }

    public void LoadList(){
        //Set the dates...
        //Get todays date.
        java.util.Date dt = new java.util.Date();
        //java.sql.Date todaysdate = new java.sql.Date( dt.getTime());
        jDateChooserStart.setDate(dt);
        jDateChooserStop.setDate(dt);
    }

    @Action
    public void RunReport() {
        //Clean the table.
        CleanTable();
        
        //Get Start Date.
        java.util.Date sdte = jDateChooserStart.getDate();
        java.sql.Date SDate = new java.sql.Date( sdte.getTime() );

        //Get Finish Date.
        java.util.Date fdte = jDateChooserStop.getDate();
        java.sql.Date FDate = new java.sql.Date( fdte.getTime() );

        //Set Begining Date.
        java.sql.Date BDate = new java.sql.Date(2010,1,1);

        //Start of report.
        //Open Database connection.
        DBA.openDBCon();
        
        //Read Loss Log for Beers prior to start date.
        ODestroyed = DBA.RunSQLQuery("SELECT LKeg,LCellar,LBtl FROM LossLog WHERE LDate<'" +
                SDate.toString() + "'");

        OCondArray = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<'" + SDate.toString() + "' AND MovementStateID='15'");

        OPkgArray = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume,MovementStateID" +
                " FROM Movement WHERE MovementDate<'" + SDate.toString() +
                "' AND ( MovementStateID='20' OR MovementStateID='21' OR MovementStateID='25')");

        OLagerArray = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<'" + SDate.toString() + "' AND MovementStateID='10'");

        OTRMovement = DBA.RunSQLQuery("SELECT NumHalf,NumQtr,NumSix,NumTT,NumTW,NumSF FROM Sales " +
                "WHERE SDate<'" + SDate.toString() + "' AND CustID='14'");

        OCustMovement = DBA.RunSQLQuery("SELECT NumHalf,NumQtr,NumSix,NumTT,NumTW,NumSF FROM Sales " +
                "WHERE SDate<'" + SDate.toString() + "' AND CustID!='14'");

        //What is in barrel aging.
        OBarrelVol = DBA.RunSQLQuery("SELECT BAVol FROM BarrelAging WHERE BADate<'" + SDate.toString() +
                "' AND BAVol!='0'");

        //What was moved from primary to barrels.
        OBarrelPrimeMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<'" + SDate.toString() + "' AND MovementOldState='5' AND " +
                "MovementStateID='25'");

        //What was moved from lagering to barrels.
        OBarrelSecondMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<'" + SDate.toString() + "' AND MovementOldState='10' AND " +
                "MovementStateID='25'");

        //What was moved from conditioning to barrels.
        OBarrelCondMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<'" + SDate.toString() + "' AND MovementOldState='15' AND " +
                "MovementStateID='25'");

        OCondBarrelMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<'" + SDate.toString() + "' AND MovementOldState='25' AND " +
                "MovementStateID='15'");

        //Start checking new values in selected period.
        FermAmt = DBA.RunSQLQuery("SELECT MovementVolume FROM Movement WHERE " +
                "MovementDate>='" + SDate.toString() + "' AND MovementDate<='" +
                FDate.toString() + "' AND MovementOldState='5'");

        KegMove = DBA.RunSQLQuery("SELECT MovementVolume FROM Movement WHERE " +
                "MovementDate>='" + SDate.toString() + "' AND MovementDate<='" +
                FDate.toString() + "' AND MovementStateID='20'");

        BtlMove = DBA.RunSQLQuery("SELECT MovementVolume FROM Movement WHERE " +
                "MovementDate>='" + SDate.toString() + "' AND MovementDate<='" +
                FDate.toString() + "' AND MovementStateID='21'");
        //Taproom Sales.
        TRMovement = DBA.RunSQLQuery("SELECT NumHalf,NumQtr,NumSix,NumTT,NumTW,NumSF FROM Sales " +
                "WHERE SDate>='" + SDate.toString() + "' AND SDate<='" +
                FDate.toString() + "' AND CustID='14'");
        //Customer Sales.
        CustMovement = DBA.RunSQLQuery("SELECT NumHalf,NumQtr,NumSix,NumTT,NumTW,NumSF FROM Sales " +
                "WHERE SDate>='" + SDate.toString() + "' AND SDate<='" +
                FDate.toString() + "' AND CustID!='14'");
        
        //#################################
        //## Check values for date range ##
        //#################################
        
        //Check all data again for selected date range.
        LagerArray = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<='" + FDate.toString() +
                "' AND MovementStateID='10'");
        
        Destroyed = DBA.RunSQLQuery("SELECT LKeg,LCellar,LBtl FROM LossLog WHERE " +
                "LDate>='" + SDate.toString() +
                "' AND LDate<='" + FDate.toString() +
                "'");

        CondArray = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<='" + FDate.toString() +
                "' AND MovementStateID='15'");

        PkgArray = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume,MovementStateID" +
                " FROM Movement WHERE " +
                "MovementDate<='" + FDate.toString() +
                "' AND ( MovementStateID='20' OR MovementStateID='21' OR MovementStateID='25')");

        //Needed for the new packaging.
        NPkgArray = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume,MovementStateID" +
                " FROM Movement WHERE " +
                "MovementDate>='" + SDate.toString() +
                "' AND MovementDate<='" + FDate.toString() +
                "' AND ( MovementStateID='20' OR MovementStateID='21')");

        //What was moved from primary to barrels.
        BarrelPrimeMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<='" + FDate.toString() +
                "' AND MovementOldState='5' AND MovementStateID='25'");

        //What was moved from lagering to barrels.
        BarrelSecondMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<='" + FDate.toString() +
                "' AND MovementOldState='10' AND MovementStateID='25'");

        //What was moved from conditioning to barrels.
        BarrelCondMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<='" + FDate.toString() +
                "' AND MovementOldState='15' AND MovementStateID='25'");

        CondBarrelMove = DBA.RunSQLQuery("SELECT MovementBrewID,MovementVolume FROM Movement WHERE " +
                "MovementDate<='" + FDate.toString() +
                "' AND MovementOldState='25' AND MovementStateID='15'");

        //What is in barrel aging.
        BarrelVol = DBA.RunSQLQuery("SELECT BAVol FROM BarrelAging WHERE " +
                "BADate<='" + FDate.toString() +
                "' AND BAVol!='0'");

        /*Materials = DBA.RunSQLQuery("SELECT H1lbs,H2lbs,H3lbs,H4lbs,H5lbs,H6lbs,H7lbs,H8lbs,H9lbs" +
                ",H10lbs,BNDHLbs1,BNDHLbs2,BNDHLbs3,BNDHLbs4,RID,mlbs01,mlbs02,mlbs03,mlbs04,mlbs05" +
                ",mlbs06,mlbs07,mlbs08,mlbs09,mlbs10 FROM BrewNotes WHERE ");*/
        BrewIDs = DBA.RunSQLQuery("SELECT BrewNoteID,BrewNoteID2,BrewNoteID3,BrewNoteID4," +
                "BrewNoteID5,BrewNoteID6,RID FROM Brews WHERE " +
                "BDate>='" + SDate.toString() + "' AND BDate<'" + FDate.toString() + "'");

        //Close the database connection.
        DBA.closeDBCon();

        //Perform calculations on Result sets.
        //Determine Loss before start date.
        float OKegDestroy = 0;
        float OBBLDestroy = 0;
        float OBtlDestroy = 0;
        for(String s[] : ODestroyed){
            OKegDestroy += Float.valueOf(s[0].trim()).floatValue();
            OBBLDestroy += Float.valueOf(s[1].trim()).floatValue();
            OBtlDestroy += Float.valueOf(s[2].trim()).floatValue();
        }

        //Calculate the total beer racked to Conditioning before start date.
        float OTotRack = 0;
        for(String s[] : OCondArray){
            OTotRack += Float.valueOf(s[1].trim()).floatValue();
        }

        //Calculate the total Beer racked to Bottles or Kegs before start date.
        float OKegRack = 0;
        float OBtlRack = 0;
        for(String s[] : OPkgArray){
            if(s[2].equals("20")){
                OKegRack += Float.valueOf(s[1].trim()).floatValue();
            } else if (s[2].equals("21")){
                OBtlRack += Float.valueOf(s[1].trim()).floatValue();
            }
        }

        //Calculate the total beer in lagering in the cellar before start date.
        float OCellarLager = 0;
        for(String s[]: OLagerArray){
            OCellarLager += Float.valueOf(s[1].trim()).floatValue();
        }

        //Determine beer sold in taproom before start date.
        float OTRBBL = 0;
        float OTRBtl = 0;
        for(String s[]: OTRMovement){
            OTRBBL += ((Float.valueOf(s[0].trim()).floatValue())/2);
            OTRBBL += ((Float.valueOf(s[1].trim()).floatValue())/4);
            OTRBBL += ((Float.valueOf(s[2].trim()).floatValue())/6);

            OTRBtl += ((Float.valueOf(s[3].trim()).floatValue())*Global.TwentyTwoCase*Global.TTtoBBL);
            OTRBtl += ((Float.valueOf(s[4].trim()).floatValue())*Global.TwelveCase*Global.TWtoBBL);
            OTRBtl += ((Float.valueOf(s[5].trim()).floatValue())*Global.SevenFiftyCase*Global.SFtoBBL);
        }

        //Determine beer sold to customer accounts before start date.
        float OSalesBBL = 0;
        float OSalesBtl = 0;
        for(String s[]: OCustMovement){
            OSalesBBL += ((Float.valueOf(s[0].trim()).floatValue())/2);
            OSalesBBL += ((Float.valueOf(s[1].trim()).floatValue())/4);
            OSalesBBL += ((Float.valueOf(s[2].trim()).floatValue())/6);

            OSalesBtl += ((Float.valueOf(s[3].trim()).floatValue())*Global.TwentyTwoCase*Global.TTtoBBL);
            OSalesBtl += ((Float.valueOf(s[4].trim()).floatValue())*Global.TwelveCase*Global.TWtoBBL);
            OSalesBtl += ((Float.valueOf(s[5].trim()).floatValue())*Global.SevenFiftyCase*Global.SFtoBBL);
        }

        //###############################
        //PERFORM SAME OPS FOR NEW RANGE.
        //###############################

        float KegDestroy = 0;
        float BBLDestroy = 0;
        float BtlDestroy = 0;
        for(String s[] : Destroyed){
            KegDestroy += Float.valueOf(s[0].trim()).floatValue();
            BBLDestroy += Float.valueOf(s[1].trim()).floatValue();
            BtlDestroy += Float.valueOf(s[2].trim()).floatValue();
        }

        //Calculate the total beer racked to Conditionin.
        float TotRack = 0;
        for(String s[] : CondArray){
            TotRack += Float.valueOf(s[1].trim()).floatValue();
        }

        //Calculate the total Beer racked to Bottles or Kegs.
        float KegRack = 0;
        float BtlRack = 0;
        for(String s[] : NPkgArray){
            if(s[2].equals("20")){
                KegRack += Float.valueOf(s[1].trim()).floatValue();
            } else if (s[2].equals("21")){
                BtlRack += Float.valueOf(s[1].trim()).floatValue();
            }
        }

        //Calculate the total beer in lagering.
        float CellarLager = 0;
        for(String s[]: LagerArray){
            CellarLager += Float.valueOf(s[1].trim()).floatValue();
        }

        //Determine beer sold in taproom.
        float TRBBL = 0;
        float TRBtl = 0;
        for(String s[]: TRMovement){
            TRBBL += ((Float.valueOf(s[0].trim()).floatValue())/2);
            TRBBL += ((Float.valueOf(s[1].trim()).floatValue())/4);
            TRBBL += ((Float.valueOf(s[2].trim()).floatValue())/6);

            TRBtl += ((Float.valueOf(s[3].trim()).floatValue())*Global.TwentyTwoCase*Global.TTtoBBL);
            TRBtl += ((Float.valueOf(s[4].trim()).floatValue())*Global.TwelveCase*Global.TWtoBBL);
            TRBtl += ((Float.valueOf(s[5].trim()).floatValue())*Global.SevenFiftyCase*Global.SFtoBBL);
        }

        //Determine beer sold to customer accounts.
        float SalesBBL = 0;
        float SalesBtl = 0;
        for(String s[]: CustMovement){
            SalesBBL += ((Float.valueOf(s[0].trim()).floatValue())/2);
            SalesBBL += ((Float.valueOf(s[1].trim()).floatValue())/4);
            SalesBBL += ((Float.valueOf(s[2].trim()).floatValue())/6);

            SalesBtl += ((Float.valueOf(s[3].trim()).floatValue())*Global.TwentyTwoCase*Global.TTtoBBL);
            SalesBtl += ((Float.valueOf(s[4].trim()).floatValue())*Global.TwelveCase*Global.TWtoBBL);
            SalesBtl += ((Float.valueOf(s[5].trim()).floatValue())*Global.SevenFiftyCase*Global.SFtoBBL);
        }

        //#############################################
        //#Perform all calculations on Previous dates #
        //#############################################

        //Calculate Kegs Left After Sales before start date.
        float OKegsLeft = OKegRack - OTRBBL - OSalesBBL - OKegDestroy;

        //Calculate Bottles left after sales before start date.
        float OBtlLeft = OBtlRack - OTRBtl - OSalesBtl - OBtlDestroy;

        //Sort through various arrays to determine which beers are located where.
        float OCondLeft = 0;
        float OCondLoss = 0;
        float OCondNotMoved = 0;

        //Variables used for following algorithms.
        boolean ca = false;
        float CurVol = 0;
        //Sort through conditioning to determine if beer is packaged, still in
        //conditioning, or considered loss.
        for(String s[] : OCondArray){
            //Set ca to false every time through.
            ca = false;
            //Set total Volume of current brew.
            CurVol = Float.valueOf(s[1].trim()).floatValue();
            for(String t[] : OPkgArray){
                //Compare volume of packaging and conditioning.
                //First check if the are the same brew number.
                if(t[0].equals(s[0])){
                    CurVol -= Float.valueOf(t[1].trim()).floatValue();
                    ca = true;
                }
            }
            if (ca == false){
                /*If this flag wasn't set, then this beer has not yet
                 been packaged so this needs to be added to the 'not moved
                 value'.*/
                OCondNotMoved += Float.valueOf(s[1].trim()).floatValue();
            } else {
                if (CurVol > 0.5){
                    //If the current volume is greater than 0.9, we add it
                    //to the Old Conditioning Left value.
                    OCondLeft += CurVol;
                } else {
                    //Anything less than 0.9 BBL is considered loss and needs
                    //to be added to the Conditioning Loss value.
                    OCondLoss += CurVol;
                }
            }
        }

        //Now repeat this algorithm for the lager tanks.
        float OLagerLeft = 0;
        float OLagerLoss = 0;
        float OLagerNotMoved = 0;

        for(String s[] : OLagerArray){
            //Set ca to false every time through.
            ca = false;
            //Set total Volume of current brew.
            CurVol = Float.valueOf(s[1].trim()).floatValue();
            for(String t[] : OCondArray){
                //Compare volume of packaging and conditioning.
                //First check if the are the same brew number.
                if(t[0].equals(s[0])){
                    CurVol -= Float.valueOf(t[1].trim()).floatValue();
                    ca = true;
                }
            }
            if (ca == false){
                /*If this flag wasn't set, then this beer has not yet
                 been packaged so this needs to be added to the 'not moved
                 value'.*/
                OLagerNotMoved += Float.valueOf(s[1].trim()).floatValue();
            } else {
                if (CurVol > 1){
                    //If the current volume is greater than 0.9, we add it
                    //to the Old Conditioning Left value.
                    OLagerLeft += CurVol;
                } else {
                    //Anything less than 0.9 BBL is considered loss and needs
                    //to be added to the Conditioning Loss value.
                    OLagerLoss += CurVol;
                }
            }
        }

        //Sort through the old barrel volume and determine quantitie in the barrels prior to period.
        float OBarrelVolume = 0;
        for (String s[] : OBarrelVol){
            OBarrelVolume += Float.valueOf(s[0].trim()).floatValue();
        }

        //Now determine numbers moved from primary, secondary, and conditioning to barrels.
        float OBFVtoAge = 0;
        float OBLagtoAge = 0;
        float OBContoAge = 0;

        for (String s[] : OBarrelPrimeMove){
            OBFVtoAge += Float.valueOf(s[1].trim()).floatValue();
        }
        for (String s[] : OBarrelSecondMove){
            OBLagtoAge += Float.valueOf(s[1].trim()).floatValue();
        }
        for (String s[] : OBarrelCondMove){
            OBContoAge += Float.valueOf(s[1].trim()).floatValue();
        }
        //Now determine the beer moved from barrels back to conditioning.
        float OBAgetoCon = 0;
        for (String s[] : OCondBarrelMove){
            OBAgetoCon += Float.valueOf(s[1].trim()).floatValue();
        }

        /*Now we will calculate the "Aging Value", this value is the negative sum of all
         beer removed from the cellar to aging plus beer return back into cellar.
         This value must be subtracted from the beer totals so barrel vol can be added back in
         (These should always equal each other).*/
        //float OAgingValue = (OBFVtoAge + OBLagtoAge + OBContoAge) - OBAgetoCon;
        float OAgingValue = (OBFVtoAge + OBLagtoAge + OBContoAge);

        /*Total up the current volume in cellars.
         Volume left equals total lagering (Lager Left and Lager Not Moved)...
         Plus total conditioning (Cond Left and Cond Not Moved) minus any
         destroyed beer plus barrels minus anything removed from barrels.*/
        float OVolCelLeft = (OLagerLeft + OLagerNotMoved + OCondLeft + OCondNotMoved) +
                OBarrelVolume - OBBLDestroy;

        //Now determine the amount of beer produced from fermentation.
        float FermProd = 0;
        for (String s[] : FermAmt){
            FermProd += Float.valueOf(s[0].trim()).floatValue();
        }

        //Now determine beer racked to kegs and bottles.
        float Keg = 0;
        float Btl = 0;
        for (String s[] : KegMove){
            Keg += Float.valueOf(s[0].trim()).floatValue();
        }
        for (String s[] : BtlMove){
            Btl += Float.valueOf(s[0].trim()).floatValue();
        }

        //########################################
        //#Perform all calculations on new dates #
        //########################################
        
        //Calculate Kegs Left.
        float KegsLeft = OKegsLeft + KegRack - (TRBBL + SalesBBL + KegDestroy);

        //Calculate Bottles.
        float BtlLeft = OBtlLeft + BtlRack - (TRBtl + SalesBtl + BtlDestroy);
        
        //Sort through various arrays to determine which beers are located where.
        float CondLeft = 0;
        float CondLoss = 0;
        float CondNotMoved = 0;

        //Variables used for following algorithms.
        ca = false;
        CurVol = 0;
        //Sort through conditioning to determine if beer is packaged, still in
        //conditioning, or considered loss.
        for(String s[] : CondArray){
            //Set ca to false every time through.
            ca = false;
            //Set total Volume of current brew.
            CurVol = Float.valueOf(s[1].trim()).floatValue();
            for(String t[] : PkgArray){
                //Compare volume of packaging and conditioning.
                //First check if the are the same brew number.
                if(t[0].equals(s[0])){
                    CurVol -= Float.valueOf(t[1].trim()).floatValue();
                    ca = true;
                }
            }
            if (ca == false){
                /*If this flag wasn't set, then this beer has not yet
                 been packaged so this needs to be added to the 'not moved
                 value'.*/
                CondNotMoved += Float.valueOf(s[1].trim()).floatValue();
            } else {
                if (CurVol > 0.5){
                    //If the current volume is greater than 0.9, we add it
                    //to the Old Conditioning Left value.
                    CondLeft += CurVol;
                } else {
                    //Anything less than 0.9 BBL is considered loss and needs
                    //to be added to the Conditioning Loss value.
                    CondLoss += CurVol;
                }
            }
        }

        //Now repeat this algorithm for the lager tanks.
        float LagerLeft = 0;
        float LagerLoss = 0;
        float LagerNotMoved = 0;

        for(String s[] : LagerArray){
            //Set ca to false every time through.
            ca = false;
            //Set total Volume of current brew.
            CurVol = Float.valueOf(s[1].trim()).floatValue();
            for(String t[] : CondArray){
                //Compare volume of packaging and conditioning.
                //First check if the are the same brew number.
                if(t[0].equals(s[0])){
                    CurVol -= Float.valueOf(t[1].trim()).floatValue();
                    ca = true;
                }
            }
            if (ca == false){
                /*If this flag wasn't set, then this beer has not yet
                 been packaged so this needs to be added to the 'not moved
                 value'.*/
                LagerNotMoved += Float.valueOf(s[1].trim()).floatValue();
            } else {
                if (CurVol > 1){
                    //If the current volume is greater than 0.9, we add it
                    //to the Old Conditioning Left value.
                    LagerLeft += CurVol;
                } else {
                    //Anything less than 0.9 BBL is considered loss and needs
                    //to be added to the Conditioning Loss value.
                    LagerLoss += CurVol;
                }
            }
        }

        //Sort through the old barrel volume and determine quantitie in the barrels prior to period.
        float BarrelVolume = 0;
        for (String s[] : BarrelVol){
            BarrelVolume += Float.valueOf(s[0].trim()).floatValue();
        }

        //Now determine numbers moved from primary, secondary, and conditioning to barrels.
        float BFVtoAge = 0;
        float BLagtoAge = 0;
        float BContoAge = 0;

        for (String s[] : BarrelPrimeMove){
            BFVtoAge += Float.valueOf(s[1].trim()).floatValue();
        }
        for (String s[] : BarrelSecondMove){
            BLagtoAge += Float.valueOf(s[1].trim()).floatValue();
        }
        for (String s[] : BarrelCondMove){
            BContoAge += Float.valueOf(s[1].trim()).floatValue();
        }
        //Now determine the beer moved from barrels back to conditioning.
        float BAgetoCon = 0;
        for (String s[] : CondBarrelMove){
            BAgetoCon += Float.valueOf(s[1].trim()).floatValue();
        }
        
        /*Now we will calculate the "Aging Value", this value is the negative sum of all
         beer removed from the cellar to aging plus beer return back into cellar.
         This value must be subtracted from the beer totals so barrel vol can be added back in
         (These should always equal each other).*/
        //float OAgingValue = (OBFVtoAge + OBLagtoAge + OBContoAge) - OBAgetoCon;
        float AgingValue = (BFVtoAge + BLagtoAge + BContoAge);

        /*Total up the current volume in cellars.
         Volume left equals total lagering (Lager Left and Lager Not Moved)...
         Plus total conditioning (Cond Left and Cond Not Moved) minus any
         destroyed beer plus barrels minus anything removed from barrels.*/
        //float VolCelLeft = LagerLeft + LagerNotMoved + CondLeft + CondNotMoved +
                //BarrelVolume - AgingValue - (BBLDestroy + OBBLDestroy);
        float VolCelLeft = (LagerLeft + LagerNotMoved + CondLeft + CondNotMoved) +
                BarrelVolume - (BBLDestroy + OBBLDestroy);

        float totloss = (LagerLoss - OLagerLoss) + (CondLoss - OCondLoss);


        

        //#####################################
        //#Now fill in the appropriate arrays.#
        //#####################################

        b[1] = OVolCelLeft;
        c[1] = 0;
        d[1] = OKegsLeft;
        e[1] = 0;
        f[1] = OBtlLeft;
        g[1] = b[1] + c[1] + d[1] + e[1] + f[1];
        
        b[2] = FermProd;
        c[2] = 0;
        d[2] = 0;
        e[2] = 0;
        f[2] = 0;
        g[2] = b[2] + c[2] + d[2] + e[2] + f[2];

        b[3] = 0;
        c[3] = 0;
        d[3] = 0;
        e[3] = 0;
        f[3] = 0;
        g[3] = b[3] + c[3] + d[3] + e[3] + f[2];

        b[4] = 0;
        c[4] = 0;
        d[4] = 0;
        e[4] = 0;
        f[4] = 0;
        g[4] = b[4] + c[4] + d[4] + e[4] + f[4];

        b[5] = 0;
        c[5] = 0;
        d[5] = 0;
        e[5] = 0;
        f[5] = 0;
        g[5] = b[5] + c[5] + d[5] + e[5] + f[5];

        b[6] = 0;
        c[6] = Keg;
        d[6] = 0;
        e[6] = Btl;
        f[6] = 0;
        g[6] = b[6] + c[6] + d[6] + e[6] + f[6];
        
        b[7] = 0;
        c[7] = 0;
        d[7] = 0;
        e[7] = 0;
        f[7] = 0;
        g[7] = b[7] + c[7] + d[7] + e[7] + f[7];

        b[8] = 0;
        c[8] = 0;
        d[8] = 0;
        e[8] = 0;
        f[8] = 0;
        g[8] = b[8] + c[8] + d[8] + e[8] + f[8];

        b[9] = 0;
        c[9] = 0;
        d[9] = Keg;
        e[9] = 0;
        f[9] = 0;
        g[9] = b[9] + c[9] + d[9] + e[9] + f[9];

        b[10] = 0;
        c[10] = 0;
        d[10] = 0;
        e[10] = 0;
        f[10] = Btl;
        g[10] = b[10] + c[10] + d[10] + e[10] + f[10];

        b[11] = 0;
        c[11] = 0;
        d[11] = 0;
        e[11] = 0;
        f[11] = 0;
        g[11] = b[11] + c[11] + d[11] + e[11] + f[11];

        b[12] = 0;
        c[12] = 0;
        d[12] = 0;
        e[12] = 0;
        f[12] = 0;
        g[12] = b[12] + c[12] + d[12] + e[12] + f[12];

        b[13] = b[1] + b[2] + b[3] + b[4] + b[5] + b[6] +
                b[7] + b[8] + b[9] + b[10] + b[11];
        c[13] = c[1] + c[2] + c[3] + c[4] + c[5] + c[6] +
                c[7] + c[8] + c[9] + c[10] + c[11];
        d[13] = d[1] + d[2] + d[3] + d[4] + d[5] + d[6] +
                d[7] + d[8] + d[9] + d[10] + d[11];
        e[13] = e[1] + e[2] + e[3] + e[4] + e[5] + e[6] +
                e[7] + e[8] + e[9] + e[10] + e[11];
        f[13] = f[1] + f[2] + f[3] + f[4] + f[5] + f[6] +
                f[7] + f[8] + f[9] + f[10] + f[11];
        g[13] = b[13] + c[13] + d[13] + e[13] + f[13];

        b[14] = 0;
        c[14] = 0;
        d[14] = 0;
        e[14] = 0;
        f[14] = 0;
        g[14] = b[14] + c[14] + d[14] + e[14] + f[14];

        //Item 14 - Removed for Sale
        b[15] = 0;
        c[15] = 0;
        d[15] = SalesBBL;
        e[15] = 0;
        f[15] = SalesBtl;
        g[15] = b[15] + c[15] + d[15] + e[15] + f[15];

        //Item 15 Removed Tax - determined.
        b[16] = 0;
        c[16] = 0;
        d[16] = TRBBL;
        e[16] = 0;
        f[16] = TRBtl;
        g[16] = b[16] + c[16] + d[16] + e[16] + f[16];

        b[17] = 0;
        c[17] = 0;
        d[17] = 0;
        e[17] = 0;
        f[17] = 0;
        g[17] = b[17] + c[17] + d[17] + e[17] + f[17];

        b[18] = 0;
        c[18] = 0;
        d[18] = 0;
        e[18] = 0;
        f[18] = 0;
        g[18] = b[18] + c[18] + d[18] + e[18] + f[18];

        b[19] = 0;
        c[19] = 0;
        d[19] = 0;
        e[19] = 0;
        f[19] = 0;
        g[19] = b[19] + c[19] + d[19] + e[19] + f[19];

        b[20] = 0;
        c[20] = 0;
        d[20] = 0;
        e[20] = 0;
        f[20] = 0;
        g[20] = b[20] + c[20] + d[20] + e[20] + f[20];

        b[21] = 0;
        c[21] = 0;
        d[21] = 0;
        e[21] = 0;
        f[21] = 0;
        g[21] = b[21] + c[21] + d[21] + e[21] + f[21];

        b[22] = 0;
        c[22] = 0;
        d[22] = 0;
        e[22] = 0;
        f[22] = 0;
        g[22] = b[22] + c[22] + d[22] + e[22] + f[22];

        //Item 22 - Beer Transfered for racking.
        b[23] = c[6];
        c[23] = 0;
        d[23] = 0;
        e[23] = 0;
        f[23] = 0;
        g[23] = b[23] + c[23] + d[23] + e[23] + f[23];

        //Item 23 - Beer transfered for bottling.
        b[24] = e[6];
        c[24] = 0;
        d[24] = 0;
        e[24] = 0;
        f[24] = 0;
        g[24] = b[24] + c[24] + d[24] + e[24] + f[24];

        b[25] = 0;
        c[25] = 0;
        d[25] = 0;
        e[25] = 0;
        f[25] = 0;
        g[25] = b[25] + c[25] + d[25] + e[25] + f[25];

        //Item 25 - Beer Racked.
        b[26] = 0;
        c[26] = c[6];
        d[26] = 0;
        e[26] = 0;
        f[26] = 0;
        g[26] = b[26] + c[26] + d[26] + e[26] + f[26];

        //Item 26 - Beer Bottled.
        b[27] = 0;
        c[27] = 0;
        d[27] = 0;
        e[27] = e[6];
        f[27] = 0;
        g[27] = b[27] + c[27] + d[27] + e[27] + f[27];

        b[28] = 0;
        c[28] = 0;
        d[28] = 0;
        e[28] = 0;
        f[28] = 0;
        g[28] = b[28] + c[28] + d[28] + e[28] + f[28];

        //Item 28 - Beer Destoryed at Brewery.
        b[29] = BBLDestroy;
        c[29] = 0;
        d[29] = KegDestroy;
        e[29] = 0;
        f[29] = BtlDestroy;
        g[29] = b[29] + c[29] + d[29] + e[29] + f[29];

        b[30] = 0;
        c[30] = 0;
        d[30] = 0;
        e[30] = 0;
        f[30] = 0;
        g[30] = b[30] + c[30] + d[30] + e[30] + f[30];

        //Item 30 - Recorded Losses
        b[31] = totloss;
        c[31] = 0;
        d[31] = 0;
        e[31] = 0;
        f[31] = 0;
        g[31] = b[31] + c[31] + d[31] + e[31] + f[31];

        b[32] = 0;
        c[32] = 0;
        d[32] = 0;
        e[32] = 0;
        f[32] = 0;
        g[32] = b[32] + c[32] + d[32] + e[32] + f[32];

        b[33] = 0;
        c[33] = 0;
        d[33] = 0;
        e[33] = 0;
        f[33] = 0;
        g[33] = b[33] + c[33] + d[33] + e[33] + f[33];

        //Item 33 - On Hand at End of Period.
        b[34] = VolCelLeft;
        c[34] = 0;
        d[34] = KegsLeft;
        e[34] = 0;
        f[34] = BtlLeft;
        g[34] = b[34] + c[34] + d[34] + e[34] + f[34];

        //Item 34 - Total Beer
        b[35] = b[15] + b[16] + b[17] + b[18] + b[19] + b[20] + b[21] + b[22] +
                b[23] + b[24] + b[25] + b[26] + b[27] + b[28] + b[29] + b[30] +
                b[31] + b[32] + b[33] + b[34];
        c[35] = c[15] + c[16] + c[17] + c[18] + c[19] + c[20] + c[21] + c[22] +
                c[23] + c[24] + c[25] + c[26] + c[27] + c[28] + c[29] + c[30] +
                c[31] + c[32] + c[33] + c[34];
        d[35] = d[15] + d[16] + d[17] + d[18] + d[19] + d[20] + d[21] + d[22] +
                d[23] + d[24] + d[25] + d[26] + d[27] + d[28] + d[29] + d[30] +
                d[31] + d[32] + d[33] + d[34];
        e[35] = e[15] + e[16] + e[17] + e[18] + e[19] + e[20] + e[21] + e[22] +
                e[23] + e[24] + e[25] + e[26] + e[27] + e[28] + e[29] + e[30] +
                e[31] + e[32] + e[33] + e[34];
        f[35] = f[15] + f[16] + f[17] + f[18] + f[19] + f[20] + f[21] + f[22] +
                f[23] + f[24] + f[25] + f[26] + f[27] + f[28] + f[29] + f[30] +
                f[31] + f[32] + f[33] + f[34];
        g[35] = b[35] + c[35] + d[35] + e[35] + f[35];

        /*int response = JOptionPane.showConfirmDialog(null,
                "Cellar = " + Float.toString(OBBLDestroy),
                "Warning",JOptionPane.WARNING_MESSAGE);*/

        //Fill in the first table.
        FillTable();

        //Fill in the tax liability.
        float TTBTaxLiability = (SalesBBL + SalesBtl + TRBBL + TRBtl) * (float)Global.TTBTax;
        jLabelTaxLiability.setText("$" + f2.format(TTBTaxLiability));

        //Fill in the materials used.
        WheatTot = 0;
        OatTot = 0;
        HoneyTot = 0;
        MolassesTot = 0;
        BarleyTot = 0;
        HopTot = 0;

        DBA.openDBCon();
        for (String s[] : BrewIDs){
            if(Integer.parseInt(s[0]) > 0){
                DBA.GetBrewNotesData(s[0]);
                DBA.GetRecipesData(s[6]);
                AddMaltCounts();
                AddHopCounts();
            }
            if(Integer.parseInt(s[1]) > 0){
                DBA.GetBrewNotesData(s[1]);
                DBA.GetRecipesData(s[6]);
                AddMaltCounts();
                AddHopCounts();
            }
            if(Integer.parseInt(s[2]) > 0){
                DBA.GetBrewNotesData(s[2]);
                DBA.GetRecipesData(s[6]);
                AddMaltCounts();
                AddHopCounts();
            }
            if(Integer.parseInt(s[3]) > 0){
                DBA.GetBrewNotesData(s[3]);
                DBA.GetRecipesData(s[6]);
                AddMaltCounts();
                AddHopCounts();
            }
            if(Integer.parseInt(s[4]) > 0){
                DBA.GetBrewNotesData(s[4]);
                DBA.GetRecipesData(s[6]);
                AddMaltCounts();
                AddHopCounts();
            }
            if(Integer.parseInt(s[5]) > 0){
                DBA.GetBrewNotesData(s[5]);
                DBA.GetRecipesData(s[6]);
                AddMaltCounts();
                AddHopCounts();
            }
        }
        DBA.closeDBCon();

        FillTable2();
        
    }

    public void AddHopCounts(){
        HopTot += DBA.H1lbs;
        HopTot += DBA.H2lbs;
        HopTot += DBA.H3lbs;
        HopTot += DBA.H4lbs;
        HopTot += DBA.H5lbs;
        HopTot += DBA.H6lbs;
        HopTot += DBA.H7lbs;
        HopTot += DBA.H8lbs;
        HopTot += DBA.H9lbs;
        HopTot += DBA.H10lbs;
        HopTot += DBA.BNDHLbs1;
        HopTot += DBA.BNDHLbs2;
        HopTot += DBA.BNDHLbs3;
        HopTot += DBA.BNDHLbs4;
    }

    public void AddMaltCounts(){
        if (DBA.MName01 == 6){
            WheatTot += DBA.mlbs01;
        } else if (DBA.MName01 == 25){
            OatTot += DBA.mlbs01;
        } else if (DBA.MName01 == 46){
            HoneyTot += DBA.mlbs01;
        } else if (DBA.MName01 == 48){
            MolassesTot += DBA.mlbs01;
        } else {
            BarleyTot += DBA.mlbs01;
        }

        if (DBA.MName02 == 6){
            WheatTot += DBA.mlbs02;
        } else if (DBA.MName02 == 25){
            OatTot += DBA.mlbs02;
        } else if (DBA.MName02 == 46){
            HoneyTot += DBA.mlbs02;
        } else if (DBA.MName02 == 48){
            MolassesTot += DBA.mlbs02;
        } else {
            BarleyTot += DBA.mlbs02;
        }

        if (DBA.MName03 == 6){
            WheatTot += DBA.mlbs03;
        } else if (DBA.MName03 == 25){
            OatTot += DBA.mlbs03;
        } else if (DBA.MName03 == 46){
            HoneyTot += DBA.mlbs03;
        } else if (DBA.MName03 == 48){
            MolassesTot += DBA.mlbs03;
        } else {
            BarleyTot += DBA.mlbs03;
        }

        if (DBA.MName04 == 6){
            WheatTot += DBA.mlbs04;
        } else if (DBA.MName04 == 25){
            OatTot += DBA.mlbs04;
        } else if (DBA.MName04 == 46){
            HoneyTot += DBA.mlbs04;
        } else if (DBA.MName04 == 48){
            MolassesTot += DBA.mlbs04;
        } else {
            BarleyTot += DBA.mlbs04;
        }

        if (DBA.MName05 == 6){
            WheatTot += DBA.mlbs05;
        } else if (DBA.MName05 == 25){
            OatTot += DBA.mlbs05;
        } else if (DBA.MName05 == 46){
            HoneyTot += DBA.mlbs05;
        } else if (DBA.MName05 == 48){
            MolassesTot += DBA.mlbs05;
        } else {
            BarleyTot += DBA.mlbs05;
        }

        if (DBA.MName06 == 6){
            WheatTot += DBA.mlbs06;
        } else if (DBA.MName06 == 25){
            OatTot += DBA.mlbs06;
        } else if (DBA.MName06 == 46){
            HoneyTot += DBA.mlbs06;
        } else if (DBA.MName06 == 48){
            MolassesTot += DBA.mlbs06;
        } else {
            BarleyTot += DBA.mlbs06;
        }

        if (DBA.MName07 == 6){
            WheatTot += DBA.mlbs07;
        } else if (DBA.MName07 == 25){
            OatTot += DBA.mlbs07;
        } else if (DBA.MName07 == 46){
            HoneyTot += DBA.mlbs07;
        } else if (DBA.MName07 == 48){
            MolassesTot += DBA.mlbs07;
        } else {
            BarleyTot += DBA.mlbs07;
        }

        if (DBA.MName01 == 6){
            WheatTot += DBA.mlbs08;
        } else if (DBA.MName08 == 25){
            OatTot += DBA.mlbs08;
        } else if (DBA.MName08 == 46){
            HoneyTot += DBA.mlbs08;
        } else if (DBA.MName08 == 48){
            MolassesTot += DBA.mlbs08;
        } else {
            BarleyTot += DBA.mlbs08;
        }

        if (DBA.MName09 == 6){
            WheatTot += DBA.mlbs09;
        } else if (DBA.MName09 == 25){
            OatTot += DBA.mlbs09;
        } else if (DBA.MName09 == 46){
            HoneyTot += DBA.mlbs09;
        } else if (DBA.MName09 == 48){
            MolassesTot += DBA.mlbs09;
        } else {
            BarleyTot += DBA.mlbs09;
        }

        if (DBA.MName10 == 6){
            WheatTot += DBA.mlbs10;
        } else if (DBA.MName10 == 25){
            OatTot += DBA.mlbs10;
        } else if (DBA.MName10 == 46){
            HoneyTot += DBA.mlbs10;
        } else if (DBA.MName10 == 48){
            MolassesTot += DBA.mlbs10;
        } else {
            BarleyTot += DBA.mlbs10;
        }
    }

    public void FillTable(){
        DefaultTableModel tabelModel = (DefaultTableModel)jTable1.getModel();
        for(int x=0; x<tabelModel.getRowCount(); x++){
            if(b[x]>0) tabelModel.setValueAt(f2.format(b[x]), x, 1);
            if(c[x]>0) tabelModel.setValueAt(f2.format(c[x]), x, 2);
            if(d[x]>0) tabelModel.setValueAt(f2.format(d[x]), x, 3);
            if(e[x]>0) tabelModel.setValueAt(f2.format(e[x]), x, 4);
            if(f[x]>0) tabelModel.setValueAt(f2.format(f[x]), x, 5);
            if(g[x]>0) tabelModel.setValueAt(f2.format(g[x]), x, 6);
        }
    }

    public void CleanTable(){
        
        DefaultTableModel tabelModel = (DefaultTableModel)jTable1.getModel();
        for(int x=1; x<tabelModel.getRowCount(); x++){
            if(x == 14) x++;
            if(!tabelModel.getValueAt(x, 1).toString().equals("###########")){
                tabelModel.setValueAt("0.00", x, 1);
            }
            if(!tabelModel.getValueAt(x, 2).toString().equals("###########")){
                tabelModel.setValueAt("0.00", x, 2);
            }
            if(!tabelModel.getValueAt(x, 3).toString().equals("###########")){
                tabelModel.setValueAt("0.00", x, 3);
            }
            if(!tabelModel.getValueAt(x, 4).toString().equals("###########")){
                tabelModel.setValueAt("0.00", x, 4);
            }
            if(!tabelModel.getValueAt(x, 5).toString().equals("###########")){
                tabelModel.setValueAt("0.00", x, 5);
            }
            if(!tabelModel.getValueAt(x, 6).toString().equals("###########")){
                tabelModel.setValueAt("0.00", x, 6);
            }
        }
    }

    public void FillTable2(){
        DefaultTableModel tabelModel = (DefaultTableModel)jTable2.getModel();
        tabelModel.setValueAt(f2.format(HopTot), 0, 1);
        tabelModel.setValueAt(f2.format(BarleyTot), 0, 5);
        tabelModel.setValueAt(f2.format(WheatTot), 0, 6);
        tabelModel.setValueAt(f2.format(OatTot), 0, 7);
        tabelModel.setValueAt(f2.format(HoneyTot) + "/" + f2.format(MolassesTot), 0, 8);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButtonRunReport;
    private com.toedter.calendar.JDateChooser jDateChooserStart;
    private com.toedter.calendar.JDateChooser jDateChooserStop;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelTaxLiability;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JRadioButton jRadioButtonQ1;
    private javax.swing.JRadioButton jRadioButtonQ2;
    private javax.swing.JRadioButton jRadioButtonQ3;
    private javax.swing.JRadioButton jRadioButtonQ4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private com.toedter.calendar.JYearChooser jYearChooser1;
    // End of variables declaration//GEN-END:variables

}
